package com.bwie.controller;
import com.bwie.pojo.User;
import com.bwie.service.UserService;
import com.bwie.service.impl.UserServiceImpl;
import com.bwie.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import org.springframework.beans.factory.annotation.Autowired;

/**
* (t_user)表控制层
*
* @author xxxxx
*/
@RestController
@RequestMapping("/t_user")
@Api(tags = "登录模块")
public class UserController {
/**
* 服务对象
*/
    @Autowired
    private UserService userServiceImpl;


    /***
     * @author: chen
     * @description:
     * @params: 用户登录
     * @return: com.bwie.utils.R
     * @date: 2025/8/28 19:44
     */
    @ApiOperation("登录")
    @PostMapping("/login")
    public R login(@RequestBody User user){
        return userServiceImpl.login(user);
    }

    @ApiOperation("获取用户列表")
    @PostMapping("getUserList")
    public R getUserList(){
        return userServiceImpl.getUserList();
    }

}
